{% extends "base.html" %}
{% block title %}AssetInfo{% endblock %}
{% load static %}
{% block custome_css %}
<link rel="stylesheet" href="{% static '../static/jqueryPager/css/paper.css' %}">
<link rel="stylesheet" href="{% static '../static/css/tablecss.css' %}">
{% endblock %}

{% block content %}
<!--展示信息-->
<h1>物资请购记录</h1>
<!--<button class="btn btn-primary" id="btn_export_list">导出列表</button>-->
<div id="page">
  <table border="1" style="white-space : nowrap" id='tab1'>
    <tr>
      <td>ID</td>
      <td>是否完成</td>
      <td>需求来源</td>
      <td>单据号</td>
      <td>采购订单号</td>
      <td>请购日期</td>
      <td>请购物资/固定资产</td>
      <td>请购部门</td>
      <td>请购人</td>
      <td>请购数量</td>
      <td>请购用途</td>
      <td>采购订单生成时间</td>
      <td>采购员</td>
      <td>超长原因说明</td>
      <td>供应商</td>
      <td>预计到货时间（采购回复）</td>
      <td>预计到货时间（供应商回复）</td>
      <td>实际到货时间（一）</td>
      <td>实际到货数量（一）</td>
      <td>实际到货时间（二）</td>
      <td>实际到货数量（二）</td>
      <td>实际到货时间（三）</td>
      <td>实际到货数量（三）</td>
      <td>未到数量</td>
      <td>是否超期</td>
      <td>超期时间</td>
      <td>备注</td>
    </tr>
    {% for assetinfo in asset_list.object_list %}
    <tr>
      <td><a href="{% url 'changedetail' assetinfo.id %}">{{ assetinfo.id }}</a></td>
      <td>{{ assetinfo.Finish }}</td>
      <td>{{ assetinfo.Source }}</td>
      <td>{{ assetinfo.Document_No }}</td>
      <td>{{ assetinfo.Order_No }}</td>
      <td>{{ assetinfo.Requisition_date }}</td>
      <td>{{ assetinfo.Materials }}</td>
      <td>{{ assetinfo.Department }}</td>
      <td>{{ assetinfo.Requisitioner }}</td>
      <td>{{ assetinfo.Requisition_Num }}</td>
      <td>{{ assetinfo.Requisition_purpose }}</td>
      <td>{{ assetinfo.Order_Time }}</td>
      <td>{{ assetinfo.Purchaser }}</td>
      <td>{{ assetinfo.Reason }}</td>
      <td>{{ assetinfo.Supplier }}</td>
      <td>{{ assetinfo.Arrival_time1 }}</td>
      <td>{{ assetinfo.Arrival_time2 }}</td>
      <td>{{ assetinfo.Actual_time1 }}</td>
      <td>{{ assetinfo.Actual_Num1 }}</td>
      <td>{{ assetinfo.Actual_time2 }}</td>
      <td>{{ assetinfo.Actual_Num2 }}</td>
      <td>{{ assetinfo.Actual_time3 }}</td>
      <td>{{ assetinfo.Actual_Num3 }}</td>
      <td>{{ assetinfo.Unarrival_Num }}</td>
      <td>{{ assetinfo.Overdue }}</td>
      <td>{{ assetinfo.Overdue_time }}</td>
      <td>{{ assetinfo.Remarks }}</td>
      <td><a href="{% url 'delassetinfo' assetinfo.id %}">删除</a></td>
    </tr>
    {% endfor %}
  </table>
  <div class="pagination" style="margin-right: 480px;margin-top: 0px”>
        <!--分页功能-->
    <nav>
      <ul class="pagination">
    <!— 分页功能前端的方向箭头代码-->
      {% if asset_list.has_previous %}
      <li class="enabled">
        <a href="?page={{ asset_list.previous_page_number }}" rel="external nofollow" aria-label="Previous">
          <span aria-hidden="true">&laquo;</span>
        </a>
      </li>
      {% endif %}
      <!— 分页功能显示页码的中间部分代码-->
        {% for page_num in asset_list.paginator.page_range %}
        {% if page_num == asset_list.number %}
        <li class="active">
          <a class="page-link" href="#" rel="external nofollow">
            {{ page_num }}
            <span class="sr-only">(current)</span>
          </a>
        </li>
        {% else %}
        <li>
          <a class="page-link" href="?page={{ page_num }}" rel="external nofollow">{{ page_num }}
            <span class="sr-only">(current)</span>
          </a>
        </li>
        {% endif %}
        {% endfor %}
        <!— 分页功能末端的方向箭头代码-->
          {% if asset_list.has_next %}
          <li class="enabled">
            <a href="?page={{ asset_list.next_page_number }}" rel="external nofollow" aria-label="last">
              <span aria-hidden="true">&raquo;</span>
            </a>
          </li>
          {% endif %}
          </ul>
          </nav>
  </div>
</div>
{% endblock %}
{% block custome_js %}
<script src="{% static '../static/js/tablestyle.js' %}"></script>
{% endblock %}